enum WebEvent {
    PageLoad,
    PageUnLoad,
    KeyPress(char),
    Paste(String),
    Click { x: i64, y: i64 },
}
fn inspect(event: WebEvent) {
    match event {
        WebEvent::PageLoad => println!("page loaded"),
        WebEvent::PageUnLoad => println!("page unloaded"),
        WebEvent::KeyPress(c) => println!("pressed character {}", c),
        WebEvent::Paste(s) => println!("pasted string {}", s),
        WebEvent::Click { x, y } => println!("clicked at x:{}, y:{}", x, y),
    }
}
fn main() {
    let p = WebEvent::PageLoad;
    let ck = WebEvent::Click { x: 20, y: 80 };
    inspect(p);
    inspect(ck);
}
